<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <button id="btn">click</button>
  </body>
  <script>
    const userAgent = window.navigator.userAgent;
    const isWeChat = /MicroMessenger/i.test(userAgent);
    const isIOS = /iPhone|iPad|iPod/i.test(userAgent);
    alert("xxxxxx"+ isWeChat && isIOS);
    document.querySelector("#btn").onclick = function () {
      // window.open("http://192.168.95.43:5500/test/result.html", "_blank");
      const newWindow = window.open("", "_blank");

      fetch("https://test.yibiao163.cn/front/uaa/v1/naturalPerson/ipAddr").then(
        () => {
          newWindow.location = "./result.html";
        }
      );
    };
  </script>
</html>
